const { createApp } = Vue

createApp({
    data() {
        return {
            user: {
                name: '张三',
                avatar: 'https://example.com/avatar.jpg',
                email: 'zhangsan@example.com',
                gender: 'male',
                phone: '13800138000',
                birthday: '1990-01-01',
                bio: '这里是个人简介...'
            }
        }
    },
    methods: {
        goToPage(page) {
            switch (page) {
                case 'index':
                    window.location.href = 'index.html';
                    break;
                case 'consultation':
                    window.location.href = 'consultation.html';
                    break;
                case 'therapist':
                    window.location.href = 'therapist.html';
                    break;
                case 'about':
                    window.location.href = 'about.html';
                    break;
                case 'user-center':
                    window.location.href = 'user-center.html';
                    break;
            }
        },
        uploadAvatar() {
            // 实现头像上传功能
            console.log('上传头像');
            alert('头像上传功能开发中');
        },
        saveProfile() {
            // 实现保存个人资料的逻辑
            console.log('保存个人资料：', this.user);
            alert('个人资料已保存');
        }
    }
}).mount('#app') 